To express input multilevel data as binary data or as multilevel data of fewer levels than that of the input binary data, pseudo halftone processing is conventionally used. As an example of the pseudo halftone processing, an error diffusion method is known. This error diffusion method is published in “An Adaptive Algorithm for Spatial Gray Scale” in Society for Information Display 1975 Symposium Digest of Technical Papers, 1975, 36. In this method, let P be the pixel of interest, v be the density of the pixel, v0, v1, v2, and v3 be the densities of pixels P0, P1, P2, and P3 which are present in the neighborhood of the pixel of interest P before binarization processing, and T be the threshold value to be used for binarization. A binarization error E at the point of interest P is weighted using weight coefficients W0, W1, W2, and W3 that are empirically obtained and distributed to the neighboring pixels P0, P1, P2, and P3. That is, this method macroscopically equalizes the average density of the output image and the density of the input image. When output binary data is represented by o, errors E0, E1, E2, and E3 for the neighboring pixels P0, P1, P2, and P3 can be obtained by the following equations.When v≧T, o=1 and E=v−VmaxWhen v<T, o=0 and E=v−Vmin                (where Vmax designates maximum density and Vmin designates minimum density)E0=E×W0;E1=E×W1;E2=E×W2;E3=E×W3;        
(Examples of weight coefficients: W0= 7/16, W1= 1/16, W2= 5/16, and W3= 3/16)
An error buffer is necessary for propagating the errors. Note that the weight coefficients are decimals of 1 or less, as is apparent from the above example.
Accordingly, in the above examples of the weight coefficients, if the number of bits of an input image is 8, and the threshold value of binarization is fixed at 128, the quantization error is −127 to 127. Hence, the number of bits of the error buffer must be as large as 12, which is disadvantageous.
Japanese Patent Publication Nos. 06-066876 and 07-022334 disclose methods of solving this problem, in which the sum of error distribution values that are obtained by dropping the decimal portions of the products that are obtained by multiplying a binarization error by weight coefficients is obtained, with the residual error calculated from the difference between that sum and the binarization error and re-distributed to the neighboring pixels.
Japanese Patent Publication No. 07-093682 discloses another method, in which n lower bits are extracted from a binarization error, 0s are set in the n lower bits of the binarization error, the obtained binarization error is multiplied by weight coefficients to obtain error distribution values, and the n lower bits extracted from the binarization error are added to one of the error distribution values and distributed to the neighboring pixels.
Japanese Patent Laid-Open No. 05-075863 discloses still another method, in which the higher bits of a binarization error are stored in a buffer memory and the lower bits of the binarization error are latched and added to the next pixel.
In the methods disclosed in Japanese Patent Publication Nos. 06-066876 and 07-022334, however, the sum of error distribution values must be obtained, and the residual error must be calculated on the basis of the difference between the sum and the binarization error.
In the method disclosed in Japanese Patent Publication No. 07-093682, no residual error needs to be calculated. However, since the bit accuracy of the binarization error to be used for error distribution calculation drops, the distribution ratio changes depending on the magnitude of the binarization error. In the above example of weighted coefficients, to nullify the residual error, four lower bits of the binarization error are set to 0, and the binarization error is multiplied by the coefficients. If the binarization error is 15 or less, all bits become 0, and the entire binarization error is distributed to a specific pixel.
In the method disclosed in Japanese Patent Laid-Open No. 05-075863, since higher bits of the binarization error are stored in the buffer memory, the buffer memory capacity can be greatly decreased. However, since the bit accuracy of the binarization error to be used for error distribution calculation drops, as in the method disclosed in Japanese Patent Publication No. 07-093682, the distribution ratio changes depending on the magnitude of the binarization error. In the above example of weight coefficients, to nullify the residual error, four higher bits of the binarization error must be stored in the buffer memory, and four lower bits must be stored in the latch. Since the binarization error is 15 or less, all bits become 0, and the entire binarization error is distributed to the next pixel. If five or more higher bits are stored in the buffer memory to increase the error distribution accuracy, an error is generated due to rounding. Furthermore, Japanese Patent Laid-Open No. 05-075863 teaches that, for a binarization error, “the lower bits are stored in the latch circuit 4 after sign extension”. However, when lower bits of a negative binarization error are sign-extended, 1 must be added to the higher bits.
For example, “−1” is expressed by “11111111” in 8-bit binary. When this value is divided into four higher bits “1111” and four lower bits “1111”, the lower bits can be sign-extended to “11111” that represents “−1”. However, the higher bits “1111” indicates “11110000” that represents “−16”. Hence, the sum of the higher- and lower bits represents “−17”. To prevent this mismatch, “1” must be added to the higher bits “1111” to set “0000” (the carry is not taken into consideration). In addition, since the lower bits of the binarization error are added to the input pixel data, the range of the binarization error is extended, resulting in an increase of 1 bit. For example, assume that the four lower bits of a binarization error are to be latched. A normal binarization error ranges from −127 to 127 and can be expressed by 8 bits. In the method disclosed in Japanese Patent Laid-Open No. 05-075863, since the four lower bits (since sign extension is executed, the range is from −15 to 15) of the binarization error are added to the input pixel data, the binarization error ranges from −142 to 142. That is, 9 bits are necessary.